Optimal. Leaf size=84 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{a^{3/2} b^{5/2}}+\frac{x (b e-a f)}{b^2}-\frac{c}{a x}+\frac{f x^3}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0940384, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {1802, 205} \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{a^{3/2} b^{5/2}}+\frac{x (b e-a f)}{b^2}-\frac{c}{a x}+\frac{f x^3}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1802
Rule 205
Rubi steps
\begin{align*} \int \frac{c+d x^2+e x^4+f x^6}{x^2 \left (a+b x^2\right )} \, dx &=\int \left (\frac{b e-a f}{b^2}+\frac{c}{a x^2}+\frac{f x^2}{b}+\frac{-b^3 c+a b^2 d-a^2 b e+a^3 f}{a b^2 \left (a+b x^2\right )}\right ) \, dx\\ &=-\frac{c}{a x}+\frac{(b e-a f) x}{b^2}+\frac{f x^3}{3 b}+\frac{\left (-b^3 c+a b^2 d-a^2 b e+a^3 f\right ) \int \frac{1}{a+b x^2} \, dx}{a b^2}\\ &=-\frac{c}{a x}+\frac{(b e-a f) x}{b^2}+\frac{f x^3}{3 b}-\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} b^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.0633793, size = 83, normalized size = 0.99 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (-a^2 b e+a^3 f+a b^2 d-b^3 c\right )}{a^{3/2} b^{5/2}}+\frac{x (b e-a f)}{b^2}-\frac{c}{a x}+\frac{f x^3}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 114, normalized size = 1.4 \begin{align*}{\frac{f{x}^{3}}{3\,b}}-{\frac{afx}{{b}^{2}}}+{\frac{ex}{b}}-{\frac{c}{ax}}+{\frac{{a}^{2}f}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{ae}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{d\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{bc}{a}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.5066, size = 444, normalized size = 5.29 \begin{align*} \left [\frac{2 \, a^{2} b^{2} f x^{4} - 6 \, a b^{3} c + 3 \,{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt{-a b} x \log \left (\frac{b x^{2} - 2 \, \sqrt{-a b} x - a}{b x^{2} + a}\right ) + 6 \,{\left (a^{2} b^{2} e - a^{3} b f\right )} x^{2}}{6 \, a^{2} b^{3} x}, \frac{a^{2} b^{2} f x^{4} - 3 \, a b^{3} c - 3 \,{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt{a b} x \arctan \left (\frac{\sqrt{a b} x}{a}\right ) + 3 \,{\left (a^{2} b^{2} e - a^{3} b f\right )} x^{2}}{3 \, a^{2} b^{3} x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.30436, size = 150, normalized size = 1.79 \begin{align*} - \frac{\sqrt{- \frac{1}{a^{3} b^{5}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (- a^{2} b^{2} \sqrt{- \frac{1}{a^{3} b^{5}}} + x \right )}}{2} + \frac{\sqrt{- \frac{1}{a^{3} b^{5}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (a^{2} b^{2} \sqrt{- \frac{1}{a^{3} b^{5}}} + x \right )}}{2} + \frac{f x^{3}}{3 b} - \frac{x \left (a f - b e\right )}{b^{2}} - \frac{c}{a x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1902, size = 116, normalized size = 1.38 \begin{align*} -\frac{c}{a x} - \frac{{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} a b^{2}} + \frac{b^{2} f x^{3} - 3 \, a b f x + 3 \, b^{2} x e}{3 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]